<html>
	{% include "../common_head.html" %}
	<body>
	{% include "../common_menus.html" %}
	
	
	<div id="content">
	
		<div id="rakontu_form_style" class="rakontu_form">
		<form action="/{{dir_visit}}/{{url_preferences}}?{{rakontu.urlQuery}}" method="post" enctype="multipart/form-data">
		
		{% if changes_saved %}
			<div class="message">{{template_changes_saved}}</div>
		{% endif %}
		
		{% if member.isOnlineMember %}
			{% if member.canTakeOnAnyHelpingRole %}
				<h3>{{template_helping_roles}}</h3>
				<fieldset>
				{% for i in 3|makeRange %}
					{% if member.helpingRolesAvailable|listLookup:i %}
						<p><input type="checkbox" name="helpingRole{{i}}" value="helpingRole{{i}}" id="helpingRole{{i}}"
							{% if member.helpingRoles|listLookup:i %}
								checked="checked"
							{% endif %}
							/><label for="helpingRole{{i}}">{{template_i_am_a}} {{helping_role_names|listLookup:i}}</label></p>
						{% if rakontu.roleReadmes_formatted|listLookup:i %}
							<div class="indented">{{rakontu.roleReadmes_formatted|listLookup:i}}</div>
						{% endif %}
						{% ifequal i 1 %}
							<table style="width:90%; border:none; margin-left:20px;">
							<tr><td align="left" style="border:none; padding-left:6px;">{{template_guide_intro_question}}</td></tr>
							<tr><td class="noborder">
							<textarea name="guideIntro" rows="3" cols="60">{{member.guideIntro|orNothing}}</textarea>
							</td><td class="noborder" width="80">
							<p>{{template_interpret_as}}</p>
								<select name="guideIntro_format">
								{% for i in text_formats|makeRangeFromListLength %}
									<option value="{{text_formats|listLookup:i}}" 
										{% if text_formats|listLookup:i|equalTest:member.guideIntro_format %}
											selected="selected"
										{% endif %}
									>{{text_formats_display|listLookup:i}}</option>
								{% endfor %}
								</select>
							</td></tr></table>
						{% endifequal %}
						{% ifequal i 2 %}
							{% if member.isLiaison %}
								{% if my_offline_members %}
									<p>&nbsp; &nbsp; &nbsp; <i>{{template_offline_members}}</i></p>
									<ul>
									{% for aMember in my_offline_members %}
										<li class="nobullet">{{aMember.linkString}}</li>
									{% endfor %}
									</ul>
								{% else %}
									<p>&nbsp; &nbsp; &nbsp; <i>{{template_you_have_no_offline_members}}</i></p>
								{% endif %}
							{% endif %}
						{% endifequal %}
					{% endif %}
				{% endfor %}
				</fieldset>
			{% endif %}
		{% endif %}
		
 		<h3>{{template_messages}}</h3>
		<fieldset>
		{% if member.isOnlineMember %}
			<p>{{template_do_you_want_messages}}
			{% if member.isGuide %}
				<i>({{template_guides_must_accept_messages}})</i>
			{% endif %}
			</p>
		{% else %}
			<p>{{template_offline_member_accept_messages}}</p>
		{% endif %}
		{% if not member.isOnlineMember %}
			<p>&nbsp; <input type="checkbox" name="acceptsMessages" value="yes" id="acceptsMessages"
				{% if member.acceptsMessages %}
					checked
				{% endif %}
			><label for="acceptsMessages">{{template_yes_people_can_send_messages_through_me}}</label></p>
		{% else %}
			{% if member.isGuide %}
				<p>&nbsp; <input type="checkbox" name="guideAlwaysAcceptsMessages" value="yes" id="guideAlwaysAcceptsMessages"
					checked disabled>
				<label for="guideAlwaysAcceptsMessages">{{template_yes_people_can_send_me_messages}}</label></p>
			{% else %}
				<p>&nbsp; <input type="checkbox" name="acceptsMessages" value="yes" id="acceptsMessages"
					{% if member.acceptsMessages %}
						checked
					{% endif %}
					><label for="acceptsMessages">{{template_yes_people_can_send_me_messages}}</label></p>
			{% endif %}
		{% endif %}
		
		</fieldset>
		
 		<h3>{{template_other_options}}</h3>
		<fieldset>
		<p>{{template_time_zone_choice}}</p>
			<p>&nbsp; <select name="timeZoneName"">
			{% for name in time_zone_names %}
				<option value="{{name}}"
				{% ifequal member.timeZoneName name %}
					selected="selected"
				{% endifequal %}
				>{{name}}</option>
			{% endfor %}
			</select></p>
		<p>{{template_date_display_choice}}</p>
			<p>&nbsp; <select name="dateFormat">
			{% for format in date_formats.keys %}
				<option value="{{format}}"
				{% ifequal member.dateFormat format %}
					selected="selected"
				{% endifequal %}
				>{{date_formats|dictLookup:format}}</option>
			{% endfor %}
			</select></p>
		<p>{{template_time_display_choice}}</p>
			<p>&nbsp; <select name="timeFormat">
			{% for format in time_formats.keys %}
				<option value="{{format}}"
				{% ifequal member.timeFormat format %}
					selected="selected"
				{% endifequal %}
				>{{time_formats|dictLookup:format}}</option>
			{% endfor %}
			<option value="doNotShowTimes" 
				{% if not member.timeFormat %} 
					selected="selected" 
				{% endif %}
			>{{template_do_not_show_times}}</option>
			</select></p>
		{% if member.isOnlineMember %}
			<p>{{template_choose_member_default_text_format}}</p>
			<p>&nbsp; <select name="preferredTextFormat">
				{% for format in text_formats %}
					<option value="{{format}}"
					{% ifequal member.preferredTextFormat format %}
						selected="selected"
					{% endifequal %}
					>{{format}}</option>
				{% endfor %}
			</select></p>
			<p>{{template_inline_image_display_choice}}</p>
			<p>&nbsp; <select name="showAttachedImagesInline">
				<option value="yes"
				{% if member.showAttachedImagesInline %}
					selected="selected"
				{% endif %}
				>{{template_yes}}</option>
				<option value="no"
				{% if not member.showAttachedImagesInline %}
					selected="selected"
				{% endif %}
				>{{template_no}}</option>
			</select></p>
			<p>{{template_details_text_length_choice}}</p>
			<p>&nbsp; <select name="shortDisplayLength">
				{% for choice in details_text_length_choices %}
					<option value="{{choice}}"
					{% ifequal choice member.shortDisplayLength %}
						selected="selected"
					{% endifequal %}
					>{{choice}}</option>
				{% endfor %}
			</select></p>
			<p>{{template_view_options_on_top}}</p>
				{% for option in view_options %}
					<p>&nbsp; 
					<input type="checkbox" name="showOptionsOnTop|{{option.location}}" value="yes" id="showOptionsOnTop|{{option.location}}"
						{% if option.showOptionsOnTop %}
							checked
						{% endif %}
						><label for="showOptionsOnTop|{{option.location}}">{{option.displayNameForLocation}}</label></p>
				{% endfor %}
				</select></p>
			<p>{{template_keep_timelines_pegged_to_now}}</p>
				{% for option in view_options %}
					<p>&nbsp; 
					<input type="checkbox" name="keepTimelinesPeggedToNow|{{option.location}}" value="yes" id="keepTimelinesPeggedToNow|{{option.location}}"
						{% if option.keepTimelinesPeggedToNow %}
							checked
						{% endif %}
						><label for="keepTimelinesPeggedToNow|{{option.location}}">{{option.displayNameForLocation}}</label></p>
				{% endfor %}
			<p>{{template_show_button_tooltips}}</p>
					<p>&nbsp; 
					<input type="checkbox" name="showButtonTooltips" value="yes" id="showButtonTooltips"
						{% if current_member.showButtonTooltips %}
							checked
						{% endif %}
						><label for="showButtonTooltips">{{template_show_button_tooltips_yes}}</label></p>
			{% endif %}
		</fieldset>
		
		{% if member.isOnlineMember %}
			{% if show_leave_link %}
				<div class="rightalign"><a href="/{{dir_visit}}/{{url_leave}}?{{member.urlQuery}}">{{template_leave_rakontu}}</a></div>
			{% endif %}
		{% endif %}
		
      	<p>
    <center><input type="submit" name="changeSettings|{{member.key}}" value="{{button_save_changes}}" class="button"></center>
	</form>	
	</div>
	</div>
	{% include "../common_footer.html" %}
	</body>
</html>
